<?php
namespace app\web\validate;

use think\Validate;

/**
 * 行为验证器
 * @package app\menus\validate
 * @author
 */
class RoomPrice extends Validate
{
    //定义验证规则
    protected $rule = [
        'name|房间'  => 'require',
        'room_type|房间类型'  => 'require',
        'free_time|技师'  => 'require',
        'buffer_time|预约时间' =>'require',
        'overtime|预留时间' =>'require',
        //'price|超时收费' =>'require',



    ];
    //定义验证提示
    protected $message = [
        'name.require' => '房间必须填写',
        'room_type.require' => '请选择房间类型',
        'free_time.require' => '请填写免费时间',
        'buffer_time.require' => '请填写缓冲时间',
        'overtime.require' => '延迟时间必须填写',
        //'price.require' => '请填超时收费',
    ];
    //定义验证场景
    protected $scene = [
        'add'   =>  ['name','room_type','free_time','buffer_time','overtime'],
    ];
}
